package com.akuhome.resource.DO.need;

import com.akuhome.resource.DO.RoomType;
import com.akuhome.resource.DO.RoomWay;
import com.akuhome.resource.entity.Build;

import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

public class AccNeedDetail {
    Integer id;
    //入住日期
    Date date;
    //房间数量
    Integer amount;
    //备注
    String other;
    //楼栋名
    Build build;
    //房型
    RoomType roomType;
    //开房方式
    RoomWay roomWay;
    Timestamp createTime;
    Timestamp updateTime;
    Integer accNeedId;

    public AccNeedDetail() {
    }

    public AccNeedDetail(Date date, Integer amount, Build build, RoomType roomType) {
        this.date = date;
        this.amount = amount;
        this.build = build;
        this.roomType = roomType;
    }

    public AccNeedDetail(Date date, Integer amount, String build, String roomType) {
        this.date = date;
        this.amount = amount;
        this.build = new Build(build);
        this.roomType = new RoomType(roomType);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public Build getBuild() {
        return build;
    }

    public void setBuild(Build build) {
        this.build = build;
    }

    public RoomType getRoomType() {
        return roomType;
    }

    public void setRoomType(RoomType roomType) {
        this.roomType = roomType;
    }

    public Integer getAccNeedId() {
        return accNeedId;
    }

    public void setAccNeedId(Integer accNeedId) {
        this.accNeedId = accNeedId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public RoomWay getRoomWay() {
        return roomWay;
    }

    public void setRoomWay(RoomWay roomWay) {
        this.roomWay = roomWay;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AccNeedDetail that = (AccNeedDetail) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
